package multithreading;

public class Way {
    public static void main(String[] args) {
        ExtendsThread et1 = new ExtendsThread("线程1");
        ExtendsThread et2 = new ExtendsThread("线程2");

        String name1 = et1.getName();
        System.out.println(name1);
        String name2 = et2.getName();
        System.out.println(name2);
        et1.setPriority(1);
        et2.setPriority(10);
        et1.start();
        et2.start();
        Thread thread = Thread.currentThread();
        System.out.println(thread.getName());

    }
}
